#ifndef PEOPLETREENODE_H
#define PEOPLETREENODE_H

#include <QString>
#include <QList>
#include <QIcon>

class PeopleTreeNode
{
public:
    PeopleTreeNode(const QString &type, const QString &name, int id = 0);
    ~PeopleTreeNode();

    QString name() const;
    int id() const;

    PeopleTreeNode* parent() const;
    void setParent(PeopleTreeNode *parent);

    PeopleTreeNode* child(int row) const;
    int childIndex(PeopleTreeNode *child) const;
    int childCount() const;

    void appendChild(PeopleTreeNode *child);

    QIcon icon() const;

    QString type() const;

private:
    QString m_type;
    QString m_name;
    int m_id;
    PeopleTreeNode *m_parent;
    QList<PeopleTreeNode *> m_childrens;
};

#endif // PEOPLETREENODE_H
